<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>注册成功</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="css/common.css">
	<script src="js/jquery-3.3.1.js"></script>
    <!-- 导入vue和axios -->
    <script src="js/vue.js"></script>
    <script src="js/axios-0.19.0.js"></script>
    <style>
        #app {
            text-align: center;
            padding-top: 80px;
            padding-bottom: 80px;
            border: 5px solid lightgray;
        }

        #resultSpan {
            color: #ff0000;
            font-weight: bolder;
            font-size: 24px;
        }
    </style>
</head>
<body>
<!--引入头部-->
<div id="header">
</div>
<!-- 头部 end -->
<div id="app">
    <span style="font-size: 30px">恭喜您，注册成功！</span>
    <div><span id="resultSpan">{{num}}</span>秒后，跳转到 <a href="login.html">登录页面</a></div>
</div>
<!--引入尾部-->
<div id="footer">
</div>
<script src="js/include.js"></script>
<script type="text/javascript">
    new Vue({
        el:"#app",
        data:{
            num:5
        },
        // 创建完毕data与methods的时候调用created方法，钩子行数
        created(){
            //开启定时任务
            setInterval(()=>{
                this.num--;
                if(this.num==0){
                    //调整到登陆页面
                    location.href="/login.html";
                }
            },1000);
        }
    })
</script>
</body>
</html>
